package com.chansos.dubbogo.project_generator;

import icons.PluginIcons;

import javax.swing.*;
import java.util.List;

public enum GoGenericTemplate {
    EmptyProject("Empty Project", PluginIcons.Default_Template_Icon, new EmptyProjectGenerator()),
    SampleCode("Sample Code", PluginIcons.Default_Template_Icon, new SampleCodeGenerator()),
    ;

    GoGenericTemplate(String name, Icon icon, ProjectGenerator generator) {
        this.name = name;
        this.icon = icon;
        this.generator = generator;
    }

    private String name;
    private Icon icon;

    private ProjectGenerator generator;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Icon getIcon() {
        return icon;
    }

    public void setIcon(Icon icon) {
        this.icon = icon;
    }

    public ProjectGenerator getGenerator() {
        return generator;
    }

    public void setGenerator(ProjectGenerator generator) {
        this.generator = generator;
    }


    public static List<GoGenericTemplate> getSelections() {
        return List.of(values());
    }
}
